-
-
Notifications
You must be signed in to change notification settings - Fork 132
Show GDB server stderr/stdout output when startup times out #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Show GDB server stderr/stdout output when startup times out #634
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have considered similar approaches, but the best solution would be to display these error messages directly in the Console. This approach would align well with the overall design and user experience of Embedded CDT (embed-cdt).
Can we do both? I mean always display these messages in the console in that peculiar condition, and also show them in the message box when the Details button is pressed? It might look redundant, but the OpenOCD console might not be on top to be easily visible and some users might have difficulties to open it, therefore the graphical solution is pretty convenient. |
Both will be great, if it is possible. |
Regarding displaying the error in the console:Below is how ((Launch) launch).initializeServerConsole(monitor); is used to attach a console. However, in the OpenOCD timeout detection task, using DebugPlugin.newProcess() as a way to output to the console is not appropriate — because we don’t intend to keep this process alive (in fact, it will be killed immediately by the timeout detection task 😂). Therefore, I think we should consider using Eclipse’s console-related APIs to create a temporary console and display the final message to the user. The downside is that creating a temporary console would introduce some code that looks somewhat redundant, and it would require importing the org.eclipse.console package, which feels quite out of place. |
I have difficulties to follow the details, things seem to get very complicated. :-( |
@ilg-ul |
Can we initialize the console earlier, and, when the exception is identified, retrieve the console output and print it? |
Issue: #630
Comparing with the develop branch:
outBuffer
anderrBuffer
to member variablesfStartupErrBuffer
andfStartupOutBuffer
.getStartupOutput()
method: This method combines and returns the strings fromfStartupErrBuffer
andfStartupOutBuffer
.In the timeout check task, rm now outputs them.
Tested with: Eclipse Embedded CDT (2024-12) and Java 11 SE.